<template>
    <component is="a-modal" v-model:visible="visible" width="80%" :title="title" :mask-closable="false"
        :ok-loading="loading" @cancel="close" @before-ok="submit">
        <div style="height: 70vh;overflow-y: scroll;">
            <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
               <template #image="{record}">
                 <a-image :src="record?.info?.image" :width="100" :height="100"></a-image>
               </template>

            </sa-table>


        </div>




    </component>
</template>
<script setup>
import { onMounted, ref, reactive, computed, watch } from 'vue'
import memberApi from '@/api/system/member'
import SaTable from '@cps/sa-table/index.vue'
import { Message } from '@arco-design/web-vue'
import { throttle } from 'lodash';
import tool from '@/utils/tool'
const emit = defineEmits(["success"]);
const visible = ref(false);
const title = ref('审核记录')
const crudRef = ref()
const loading = ref(false);
const searchForm = reactive({
    table_id: ''
})
const options = reactive({
    api: memberApi.member_ticket_check_record,//表格数据接口
    operationColumnWidth: 180,//操作欄
    columnAlign: 'center',
    pageSimple: false,
    isExpand: false,//展開所有子樹
    showSearch: false,
    operationColumn: false

})

const columns = reactive([
    { title: '申请改时间', dataIndex: 'create_time', width: 180 },
    { title: '处理时间', dataIndex: 'create_time', width:180 },
    { title: '发票编号', dataIndex: 'invoice_code', width: 120 },
    { title: '发票类型', dataIndex: 'type_text', width: 120 },
    { title: '提现金额', dataIndex: 'get_num', width: 120, align: 'center' },
    { title: '当前状态', dataIndex: 'state_text', width: 120, align: 'center' },
    { title: '备注', dataIndex: 'message', width: 120,align:'center' },
    { title: '资料查看', dataIndex: 'image', width: 120,align:'center' },

])
const open = async (data) => {
    searchForm.table_id = data.id
    console.log('111', data);
    visible.value = true;
    refresh()
}
const refresh = async () => {
    crudRef.value?.refresh()
}
const paramsData = ref({})
const getParams = async () => {

}
defineExpose({ open });
</script>